package com.suxin.utils;

import java.util.function.BinaryOperator;

/**
 * @author Tang
 * @classname TiFunction
 * @description [  ]
 * @date 2023/2/16 14:03
 */
public interface TiFunction<T> extends BinaryOperator<T> {

    /**
     * identity1
     * @param <T>
     * @return
     */
    static <T> TiFunction<T> identity1() {
        return (t1, t2) -> t1;
    }

    /**
     * identity2
     * @return
     */
    static <T> TiFunction<T> identity2() {
        return (t1, t2) -> t2;
    }

}
